import request from '@/utils/http'
//获取轮播图
/* export const getBannerAPI = (params = {}) => {
    const { distributionSite = '1' } = params
    return request.get(
        'home/banner',
        {
            distributionSite
        }
    )
   //使用这个方法时需要传递一个对象
} */

//法2:参数为基本类型的值
export const getBannerAPI = (distributionSite = '1') => {
    return request.get(
        'home/banner',
        { params: { distributionSite } }
    )
}
//获取新鲜好物
export function getNewAPI() {
    return request({
        url: '/home/new',
        method: 'GET'
    })
}
//获取热门
export function getHotAPI() {
    return request.get(
        '/home/hot'
    )
}
//获取所有商品模块
export const getGoodsAPI = () => {
    return request.get(
        '/home/goods'
    )
}